package sharewithus.analyzer;

import gnu.trove.list.TLinkable;

import java.io.Serializable;


/**
 * 词性信息
 * @author terry
 *
 */
public class POSInf implements Serializable , TLinkable<POSInf>{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -8217172472233892146L;
	private PartOfSpeech pos;// 词性
	private int freq = 0;// 频率
	private long code;// 语义编码
	private POSInf previous;
	private POSInf next;
	
	public POSInf(PartOfSpeech pos, int freq, long code) {
		this.pos = pos;
		this.freq = freq;
		this.code = code;
	}
	
	public PartOfSpeech getPos() {
		return pos;
	}

	public void setPos(PartOfSpeech pos) {
		this.pos = pos;
	}

	public int getFreq() {
		return freq;
	}


	public void setFreq(int freq) {
		this.freq = freq;
	}


	public long getCode() {
		return code;
	}


	public void setCode(long code) {
		this.code = code;
	}


	public String toString() {
		return pos + ":" + freq;
	}

	public POSInf getNext() {
		return this.next;
	}

	public POSInf getPrevious() {
		return this.previous;
	}

	public void setNext(POSInf next) {
		this.next = next;
	}

	public void setPrevious(POSInf previous) {
		this.previous = previous;
	}
	
}
